package com.zapi.ai.model;

import lombok.Data;

/**
 * AI聊天响应DTO
 */
@Data
public class ChatResponse {
    
    /**
     * AI回复内容
     */
    private String message;
    
    /**
     * 会话ID
     */
    private String sessionId;
    
    /**
     * 是否成功
     */
    private boolean success;
    
    /**
     * 错误信息
     */
    private String error;
    
    /**
     * 响应时间戳
     */
    private Long timestamp;
    
    /**
     * 建议操作（可选）
     */
    private String suggestedAction;
    
    public ChatResponse() {
        this.timestamp = System.currentTimeMillis();
    }
    
    public static ChatResponse success(String message, String sessionId) {
        ChatResponse response = new ChatResponse();
        response.setSuccess(true);
        response.setMessage(message);
        response.setSessionId(sessionId);
        return response;
    }
    
    public static ChatResponse error(String error) {
        ChatResponse response = new ChatResponse();
        response.setSuccess(false);
        response.setError(error);
        return response;
    }
}

